<!-- 点亮成功 -->
<template>
	<view class="wrap">
		<!-- 中心块-成功 -->
		<view class="contentBox">
			<!-- 奖杯图标 -->
			<view class="jbBox">
				<image src="https://tuanwei.yjha.com.cn/resource/ligthSuccess.png" mode="widthFix"></image>
			</view>
			<image class="statusImg" src="https://tuanwei.yjha.com.cn/resource/success_img.png" mode="widthFix">
			</image>
			<text class="statusTip">聪明机智，速度过人，请再接再厉</text>
			<text class="accuracy">本局正确率100%</text>
		</view>

		<!-- 按钮 -->
		<button type="default" class="routerBtn" @tap="$u.debounce(continueBtn, 500)">继续点亮</button>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				wxKey: '',
				token: '',
				jdgId: '',
				isClearance: false
			}
		},
		onLoad(option) {
			// 禁用分享
			wx.hideShareMenu()
			this.wxKey = option.wxKey;
			this.token = option.token;
			this.jdgId = option.jdgId
			this.isClearance = option.isClearance;
			console.log('----')
			console.log(option)
			console.log(this.isClearance)
		},
		methods: {
			// 跳转到地图页
			continueBtn() {
				console.log('点亮成功')
				// 点亮成功后查询是否全部通关
				console.log(this.isClearance)
				if (this.isClearance == "true") {
					uni.redirectTo({
						url: '../shutSuccess/shutSuccess?wxKey=' + this.wxKey + '&token=' +
							this.token
					});
				} else {
					uni.redirectTo({
						url: '../map/map?wxKey=' + this.wxKey + '&token=' + this.token
					});
				}

			}
		}
	}
</script>

<style scoped lang="scss">
	.wrap {
		width: 100%;
		height: 100vh;
		background: url('https://tuanwei.yjha.com.cn/resource/realName_bg.png') no-repeat;
		background-size: 100% 100%;

		.contentBox {
			position: fixed;
			top: 20%;
			left: 3%;
			width: 94%;
			height: 60%;
			background-color: #fe772f;
			border-radius: 10px;
			margin: 0 auto;

			.jbBox {
				position: absolute;
				top: -110px;
				left: 50%;
				width: 140px;
				height: 140px;
				margin-left: -70px;

				image {
					width: 140px;
					height: 140px;
				}
			}

			.statusImg {
				position: absolute;
				width: 60%;
				height: 60%;
				left: 20%;
				top: 20%;
			}

			.statusTip {
				position: absolute;
				bottom: 5%;
				display: block;
				font-size: 18px;
				color: #fff;
				line-height: 30px;
				text-align: center;
				font-weight: bold;
				bottom: 14%;
				width: 100%;
			}

			.accuracy {
				position: absolute;
				display: block;
				font-size: 16px;
				color: #ffd136;
				line-height: 30px;
				text-align: center;
				font-weight: bold;
				bottom: 5%;
				width: 100%;
			}
		}

		.routerBtn {
			position: fixed;
			bottom: 10%;
			display: block;
			width: 80%;
			left: 10%;
			height: 42px;
			line-height: 42px;
			color: #8d4f0d;
			font-family: '黑体';
			background: url('https://tuanwei.yjha.com.cn/resource/ligthBtn_bg.png') no-repeat;
			background-size: 100% 100%;

			&::after {
				border: none;
			}
		}
	}
</style>
